import { xhrPostJson } from '@/services';
import { DynamicObjectAny } from '@/typings';

const baseUrl = '/arcv'

const api = {
  delete: `${baseUrl}/authtn/delete`,
  detail: `${baseUrl}/authtn/detail`,
  list: `${baseUrl}/authtn/list`,
  page: `${baseUrl}/authtn/page`,
  tree: '/sym/role/totalTree',
  create: `${baseUrl}/authtn/create`,
  update: `${baseUrl}/authtn/update`,
};

// 新增
export const authorizationCreate = (params: DynamicObjectAny) => {
  return xhrPostJson(api.create, params);
};
// 编辑
export const authorizationUpdate = (params: DynamicObjectAny) => {
  return xhrPostJson(api.update, params);
};
// 删除
export const authorizationDelete = (params: DynamicObjectAny) => {
  return xhrPostJson(api.delete, params);
};

export default api;
